#include <port_comm.h>

int main(int argc, char* argv[]){
  PortComm::PortCommType typeServer = PortComm::SERVER;

  PortComm commServer = PortComm("localhost", 5000, typeServer);

  printf("%d\n", commServer.isValid());

  int length;
  char *message;
  commServer.read_port((unsigned char **) &message, &length);
  printf("%s\n", message);

  commServer.write_port((unsigned char *)"goodbye", 8);
}
